projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e259af7
)
route simplifier crashed if simplifying by error on routes that couldn't be simplifie...
author
parkrrrr
<parkrrrr>
Thu, 26 Jul 2007 01:14:13 +0000
(
01:14
+0000)
committer
parkrrrr
<parkrrrr>
Thu, 26 Jul 2007 01:14:13 +0000
(
01:14
+0000)
smplrout.c
patch
|
blob
|
history
diff --git
a/smplrout.c
b/smplrout.c
index ec370aaa6a007db54870a7d46791e96c0e15a0b8..a7bdd2edbcd73980a3f644ebad099527842ae36c 100644
(file)
--- a/
smplrout.c
+++ b/
smplrout.c
@@
-195,6
+195,9
@@
routesimple_head( const route_head *rte )
/* short-circuit if we already have fewer than the max points */
if ( countopt && count >= rte->rte_waypt_ct) return;
+ /* short-circuit if the route is impossible to simplify, too. */
+ if ( 2 >= rte->rte_waypt_ct ) return;
+
xte_recs = (struct xte *) xcalloc( rte->rte_waypt_ct, sizeof (struct xte));
cur_rte = rte;